package com.knife.easyexcel.write.entity;

import org.apache.poi.ss.usermodel.IndexedColors;

import java.util.List;

/**
 * 单元格颜色实体
 */
public class ColorCell {
    private final Integer rowIndex;
    /**
     * 每一行的列可以有多种颜色
     */
    private final List<ColorColumn> colorColumnList;
    /**
     * 行数据处理标记
     */
    private Boolean handleFlag;

    public static class ColorColumn {
        private final String columnName;
        private final IndexedColors indexedColors;

        public ColorColumn(String columnName, IndexedColors indexedColors) {
            this.columnName = columnName;
            this.indexedColors = indexedColors;
        }

        public String getColumnName() {
            return columnName;
        }

        public IndexedColors getIndexedColors() {
            return indexedColors;
        }
    }
    public ColorCell(Integer rowIndex, List<ColorColumn> colorColumnList) {
        this.rowIndex = rowIndex;
        this.colorColumnList = colorColumnList;
        this.handleFlag = false;
    }

    public Integer getRowIndex() {
        return rowIndex;
    }

    public List<ColorColumn> getStyleList() {
        return colorColumnList;
    }

    public Boolean getHandleFlag() {
        return handleFlag;
    }

    public void handle() {
        this.handleFlag = true;
    }
}
